using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PacDot : MonoBehaviour
{
    public int score = 10; // 普通豆子分数
    public bool isPowerPellet = false; // 是否为能量豆

    void OnTriggerEnter(Collider other) {
        if (other.CompareTag("Player")) {
            // 通知游戏管理器加分
            GameManager.Instance.AddScore(score);
            // 如果是能量豆，激活反杀模式
            if (isPowerPellet) {
                GameManager.Instance.ActivatePowerMode();
            }
            Destroy(gameObject); // 销毁豆子
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
